package contegor.scire.core;


/**
 * Integer IdFragment.
 *
 * @version $Revision$
 * @author  Héctor Cirbián Pousa ($Author$)
 */
public class IntegerIdFragment extends NumericIdFragment {
  private static final long serialVersionUID = 9011094533827948208L;

  private int integer;

  public IntegerIdFragment(int integer) {
    super();
    this.integer = integer;
  }

  @Override
  public int hashCode() {
    return this.integer;
  }

  @Override
  public String toString() {
    return String.valueOf(this.integer);
  }

  public IntegerIdFragment next() {
    return new IntegerIdFragment(this.integer + 1);
  }

  @Override
  public Number getNumber() {
    return integer;
  }
}
